<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterTableUsers extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::table('users', function (Blueprint $table) {
            $table->string('username', 50)->after('id');
            $table->string('salt')->after('password')->nullable();
            $table->string('avatar')->after('salt')->nullable();
            $table->string('gender', 10)->default('male');
            $table->text('profile')->nullable();
            $table->integer('money');
            $table->string('middle_name')->nullable();
            $table->string('birth_day', 2)->nullable();
            $table->string('birth_month', 2)->nullable();
            $table->string('birth_year', 4)->nullable();
            $table->string('fb_user', 100)->after('birth_year')->nullable();
            $table->string('fb_id', 30)->after('fb_user')->nullable();
            $table->string('fb_link')->after('fb_id')->nullable();
            $table->string('website')->nullable();
            $table->boolean('notify_email')->default(true);
            $table->boolean('notify_lessons')->default(true);
            $table->boolean('notify_lyrics')->default(true);
            $table->boolean('notify_videos')->default(true);
            $table->boolean('notify_comments')->default(true);
            $table->boolean('notify_questions')->default(true);
            $table->boolean('notify_answers')->default(true);
            $table->boolean('notify_contests')->default(true);
            $table->boolean('notify_followers')->default(true);
            $table->integer('followers')->default(0);
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }

}
